<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Joomla! 扩展的模板</title>
<link rel="stylesheet" href="../css/prettify.css" />
<script type="text/javascript" src="../js/prettify.js"></script>
</head>
<body onload="prettyPrint()">
<h3>为扩展引入stylesheet</h3>
<p>注意：写作“extension/name.css”的实际引入路径是“media/extension/css/name.css”</p>
<pre class="prettyprint linenums">
//site/mod_language/tmpl/default.php中
JHtml::_('stylesheet', 'mod_languages/template.css', array(), true);

//site/mod_finder/tmpl/default.php中
JHtml::stylesheet('com_finder/finder.css', false, true, false);
</pre>
<h3>为扩展引入javascript</h3>
<p>注意：写作“extension/name.js”的实际引入路径是“media/extension/js/name.js”</p>
<pre class="prettyprint linenums">
//site/mod_language/tmpl/default.php中

//site/mod_finder/tmpl/default.php中
JHtml::script('com_finder/autocompleter.js', false, true);
</pre>
<h3>为扩展引入image</h3>
<p>注意：写作“extension/name.gif”的实际引入路径是“media/extension/images/name.gif”</p>
<p>另外：image可以在模板文件中进行覆盖。</p>
<pre class="prettyprint linenums">
//site/mod_language/tmpl/default.php中
JHtml::_('image', 'mod_languages/'.$language->image.'.gif', $language->title_native, array('title'=>$language->title_native), true);

//site/mod_finder/tmpl/default.php中
</pre>
<br />
<hr />
<p>更多参考：<a href="http://docs.joomla.org/JHtml/1.6">http://docs.joomla.org/JHtml/1.6</a></p>
<h2> <span class="mw-headline" id="JHtml"><span>Version 1.6</span> JHtml</span></h2>
<h3> <span class="mw-headline" id="Description">Description</span></h3>
<p><a href="/index.php?title=Description:JHtml&amp;action=edit&amp;redlink=1" class="new" title="Description:JHtml (page does not exist)">Description:JHtml</a> <span class="editsection" style="font-size:76%;">[<a href="/index.php?title=Description:JHtml&amp;action=edit&amp;redlink=1" class="new" title="Description:JHtml (page does not exist)">Edit Descripton</a>]</span></p>
<h3> <span class="mw-headline" id="Methods">Methods</span></h3>
<table class="tbl" border="1">
<tr>
<th>Visibility</th>
<th>Method name</th>
<th>Description</th>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::_/1.6" title="JHtml:: /1.6">_</a></td>
<td>Class loader method.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::addIncludePath/1.6" title="JHtml::addIncludePath/1.6">addIncludePath</a></td>
<td>Add a directory where should search for helpers.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::calendar/1.6" title="JHtml::calendar/1.6">calendar</a></td>
<td>Displays a calendar control field.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::core/1.6" title="JHtml::core/1.6">core</a></td>
<td></td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::date/1.6" title="JHtml::date/1.6">date</a></td>
<td>Returns formated date according to a given format and time zone.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::iframe/1.6" title="JHtml::iframe/1.6">iframe</a></td>
<td>Write a &lt;iframe&gt;&lt;/iframe&gt; element.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::image/1.6" title="JHtml::image/1.6">image</a></td>
<td>Write a.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::isRegistered/1.6" title="JHtml::isRegistered/1.6">isRegistered</a></td>
<td>Test if the key is registered.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::link/1.6" title="JHtml::link/1.6">link</a></td>
<td>Write a element.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::register/1.6" title="JHtml::register/1.6">register</a></td>
<td>Registers a function to be called with a specific key.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::script/1.6" title="JHtml::script/1.6">script</a></td>
<td>Write a &lt;script&gt;&lt;/script&gt; element.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::setFormatOptions/1.6" title="JHtml::setFormatOptions/1.6">setFormatOptions</a></td>
<td>Set format related options.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::stylesheet/1.6" title="JHtml::stylesheet/1.6">stylesheet</a></td>
<td>Write a &lt;link rel="stylesheet" style="text/css"&gt; element.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::tooltip/1.6" title="JHtml::tooltip/1.6">tooltip</a></td>
<td>Creates a tooltip with an image as button.</td>
</tr>
<tr>
<td>public static</td>
<td><a href="http://docs.joomla.org/JHtml::unregister/1.6" title="JHtml::unregister/1.6">unregister</a></td>
<td>Removes a key for a method from registry.</td>
</tr>
<tr>
<td>protected static</td>
<td><a href="http://docs.joomla.org/JHtml::extract/1.6" title="JHtml::extract/1.6">extract</a></td>
<td></td>
</tr>
</table>
<ul>
<li><b>Defined in</b> libraries/joomla/html/html.php</li>
</ul>
<h3> <span class="mw-headline" id="Importing">Importing</span></h3>
<pre class="de1">
jimport<span class="br0">(</span> <span class="st_h">'joomla.html.html'</span> <span class="br0">)</span><span class="sy0">;</span>
</pre>
<h3> <span class="mw-headline" id="See_also">See also</span></h3>
<ul>
<li><span>Version 1.6</span> <b>JHtml source code</b> on <a href="http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&amp;path=/development/tags/1.6.x/1.6.3/libraries/joomla/html/html.php&amp;view=markup" class="extiw" title="jframework16:html/html.php">JoomlaCode</a></li>
<li><span>Version 1.6</span> Subpackage <a href="/Subpackage_Html/1.6" title="Subpackage Html/1.6">Html</a></li>
<li><a href="http://docs.joomla.org/JHtml" title="JHtml">Other versions of JHtml</a></li>
</ul>
<hr />
<p>更多参考：<a href="http://docs.joomla.org/JHtml::_/1.6">http://docs.joomla.org/JHtml::_/1.6</a></p>
<h2> <span class="mw-headline" id="JHtml::"><span>Version 1.6</span> JHtml::_</span></h2>
<h3> <span class="mw-headline" id="Description">Description</span></h3>
<p>Class loader method.</p>
<p><a href="/index.php?title=Description:JHtml::&amp;action=edit&amp;redlink=1" class="new" title="Description:JHtml:: (page does not exist)">Description:JHtml::</a> <span class="editsection" style="font-size:76%;">[<a href="/index.php?title=Description:JHtml::&amp;action=edit&amp;redlink=1" class="new" title="Description:JHtml:: (page does not exist)">Edit Descripton</a>]</span></p>
<pre class="de1">
<span class="kw2">public</span> static <span class="kw2">function</span> _ <span class="br0">(</span><span class="re0">$key</span><span class="br0">)</span>
</pre>
<table class="tbl" border="1">
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>$key</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<ul>
<li><b>Returns</b></li>
<li><b>Defined</b> on line 79 of libraries/joomla/html/html.php</li>
<li><b>Referenced by</b>
<ul>
<li><a href="http://docs.joomla.org/JButtonStandard::_getCommand/1.6" title="JButtonStandard:: getCommand/1.6">JButtonStandard::_getCommand</a></li>
<li><a href="http://docs.joomla.org/JButtonConfirm::_getCommand/1.6" title="JButtonConfirm:: getCommand/1.6">JButtonConfirm::_getCommand</a></li>
<li><a href="http://docs.joomla.org/JElementModuleLayouts::_getOptions/1.6" title="JElementModuleLayouts:: getOptions/1.6">JElementModuleLayouts::_getOptions</a></li>
<li><a href="http://docs.joomla.org/JElementComponentLayouts::_getOptions/1.6" title="JElementComponentLayouts:: getOptions/1.6">JElementComponentLayouts::_getOptions</a></li>
<li><a href="http://docs.joomla.org/JElementList::_getOptions/1.6" title="JElementList:: getOptions/1.6">JElementList::_getOptions</a></li>
<li><a href="http://docs.joomla.org/JPaneSliders::_loadBehavior/1.6" title="JPaneSliders:: loadBehavior/1.6">JPaneSliders::_loadBehavior</a></li>
<li><a href="http://docs.joomla.org/JPaneTabs::_loadBehavior/1.6" title="JPaneTabs:: loadBehavior/1.6">JPaneTabs::_loadBehavior</a></li>
<li><a href="http://docs.joomla.org/JHtmlTabs::_loadBehavior/1.6" title="JHtmlTabs:: loadBehavior/1.6">JHtmlTabs::_loadBehavior</a></li>
<li><a href="http://docs.joomla.org/JHtmlSliders::_loadBehavior/1.6" title="JHtmlSliders:: loadBehavior/1.6">JHtmlSliders::_loadBehavior</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::accesslevel/1.6" title="JHtmlList::accesslevel/1.6">JHtmlList::accesslevel</a></li>
<li><a href="http://docs.joomla.org/JHtmlJGrid::action/1.6" title="JHtmlJGrid::action/1.6">JHtmlJGrid::action</a></li>
<li><a href="http://docs.joomla.org/JHtmlRules::assetFormWidget/1.6" title="JHtmlRules::assetFormWidget/1.6">JHtmlRules::assetFormWidget</a></li>
<li><a href="http://docs.joomla.org/JHtmlAccess::assetgrouplist/1.6" title="JHtmlAccess::assetgrouplist/1.6">JHtmlAccess::assetgrouplist</a></li>
<li><a href="http://docs.joomla.org/JHtmlSelect::booleanlist/1.6" title="JHtmlSelect::booleanlist/1.6">JHtmlSelect::booleanlist</a></li>
<li><a href="/index.php?title=Calendar/1.6&amp;action=edit&amp;redlink=1" class="new" title="Calendar/1.6 (page does not exist)">calendar</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::caption/1.6" title="JHtmlBehavior::caption/1.6">JHtmlBehavior::caption</a></li>
<li><a href="http://docs.joomla.org/JHtmlCategory::categories/1.6" title="JHtmlCategory::categories/1.6">JHtmlCategory::categories</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::category/1.6" title="JHtmlList::category/1.6">JHtmlList::category</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::combobox/1.6" title="JHtmlBehavior::combobox/1.6">JHtmlBehavior::combobox</a></li>
<li><a href="http://docs.joomla.org/JElementList::fetchElement/1.6" title="JElementList::fetchElement/1.6">JElementList::fetchElement</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::formvalidation/1.6" title="JHtmlBehavior::formvalidation/1.6">JHtmlBehavior::formvalidation</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::framework/1.6" title="JHtmlBehavior::framework/1.6">JHtmlBehavior::framework</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::genericordering/1.6" title="JHtmlList::genericordering/1.6">JHtmlList::genericordering</a></li>
<li><a href="http://docs.joomla.org/JFormFieldTimezone::getGroups/1.6" title="JFormFieldTimezone::getGroups/1.6">JFormFieldTimezone::getGroups</a></li>
<li><a href="http://docs.joomla.org/JFormFieldTemplateStyle::getGroups/1.6" title="JFormFieldTemplateStyle::getGroups/1.6">JFormFieldTemplateStyle::getGroups</a></li>
<li><a href="http://docs.joomla.org/JFormFieldMenuItem::getGroups/1.6" title="JFormFieldMenuItem::getGroups/1.6">JFormFieldMenuItem::getGroups</a></li>
<li><a href="http://docs.joomla.org/JFormFieldGroupedList::getGroups/1.6" title="JFormFieldGroupedList::getGroups/1.6">JFormFieldGroupedList::getGroups</a></li>
<li><a href="http://docs.joomla.org/JFormFieldModuleLayout::getInput/1.6" title="JFormFieldModuleLayout::getInput/1.6">JFormFieldModuleLayout::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldMedia::getInput/1.6" title="JFormFieldMedia::getInput/1.6">JFormFieldMedia::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldList::getInput/1.6" title="JFormFieldList::getInput/1.6">JFormFieldList::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldGroupedList::getInput/1.6" title="JFormFieldGroupedList::getInput/1.6">JFormFieldGroupedList::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldComponentLayout::getInput/1.6" title="JFormFieldComponentLayout::getInput/1.6">JFormFieldComponentLayout::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldCombo::getInput/1.6" title="JFormFieldCombo::getInput/1.6">JFormFieldCombo::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldCalendar::getInput/1.6" title="JFormFieldCalendar::getInput/1.6">JFormFieldCalendar::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldAccessLevel::getInput/1.6" title="JFormFieldAccessLevel::getInput/1.6">JFormFieldAccessLevel::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldUsergroup::getInput/1.6" title="JFormFieldUsergroup::getInput/1.6">JFormFieldUsergroup::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldUser::getInput/1.6" title="JFormFieldUser::getInput/1.6">JFormFieldUser::getInput</a></li>
<li><a href="http://docs.joomla.org/JFormFieldRules::getInput/1.6" title="JFormFieldRules::getInput/1.6">JFormFieldRules::getInput</a></li>
<li><a href="http://docs.joomla.org/JPagination::getLimitBox/1.6" title="JPagination::getLimitBox/1.6">JPagination::getLimitBox</a></li>
<li><a href="http://docs.joomla.org/JFormFieldSQL::getOptions/1.6" title="JFormFieldSQL::getOptions/1.6">JFormFieldSQL::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldSessionHandler::getOptions/1.6" title="JFormFieldSessionHandler::getOptions/1.6">JFormFieldSessionHandler::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldRadio::getOptions/1.6" title="JFormFieldRadio::getOptions/1.6">JFormFieldRadio::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldList::getOptions/1.6" title="JFormFieldList::getOptions/1.6">JFormFieldList::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldInteger::getOptions/1.6" title="JFormFieldInteger::getOptions/1.6">JFormFieldInteger::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldFolderList::getOptions/1.6" title="JFormFieldFolderList::getOptions/1.6">JFormFieldFolderList::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldFileList::getOptions/1.6" title="JFormFieldFileList::getOptions/1.6">JFormFieldFileList::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldContentLanguage::getOptions/1.6" title="JFormFieldContentLanguage::getOptions/1.6">JFormFieldContentLanguage::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldCheckboxes::getOptions/1.6" title="JFormFieldCheckboxes::getOptions/1.6">JFormFieldCheckboxes::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldCacheHandler::getOptions/1.6" title="JFormFieldCacheHandler::getOptions/1.6">JFormFieldCacheHandler::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldCategory::getOptions/1.6" title="JFormFieldCategory::getOptions/1.6">JFormFieldCategory::getOptions</a></li>
<li><a href="http://docs.joomla.org/JFormFieldMenu::getOptions/1.6" title="JFormFieldMenu::getOptions/1.6">JFormFieldMenu::getOptions</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::images/1.6" title="JHtmlList::images/1.6">JHtmlList::images</a></li>
<li><a href="http://docs.joomla.org/JHtmlSelect::integerlist/1.6" title="JHtmlSelect::integerlist/1.6">JHtmlSelect::integerlist</a></li>
<li><a href="http://docs.joomla.org/JHtmlAccess::level/1.6" title="JHtmlAccess::level/1.6">JHtmlAccess::level</a></li>
<li><a href="http://docs.joomla.org/JHtmlMenu::linkoptions/1.6" title="JHtmlMenu::linkoptions/1.6">JHtmlMenu::linkoptions</a></li>
<li><a href="http://docs.joomla.org/JHtmlMenu::menuitemlist/1.6" title="JHtmlMenu::menuitemlist/1.6">JHtmlMenu::menuitemlist</a></li>
<li><a href="http://docs.joomla.org/JHtmlMenu::menuitems/1.6" title="JHtmlMenu::menuitems/1.6">JHtmlMenu::menuitems</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::modal/1.6" title="JHtmlBehavior::modal/1.6">JHtmlBehavior::modal</a></li>
<li><a href="http://docs.joomla.org/JHtmlCategory::options/1.6" title="JHtmlCategory::options/1.6">JHtmlCategory::options</a></li>
<li><a href="http://docs.joomla.org/JPagination::orderDownIcon/1.6" title="JPagination::orderDownIcon/1.6">JPagination::orderDownIcon</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::ordering/1.6" title="JHtmlList::ordering/1.6">JHtmlList::ordering</a></li>
<li><a href="http://docs.joomla.org/JHtmlMenu::ordering/1.6" title="JHtmlMenu::ordering/1.6">JHtmlMenu::ordering</a></li>
<li><a href="http://docs.joomla.org/JPagination::orderUpIcon/1.6" title="JPagination::orderUpIcon/1.6">JPagination::orderUpIcon</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::positions/1.6" title="JHtmlList::positions/1.6">JHtmlList::positions</a></li>
<li><a href="/index.php?title=Script/1.6&amp;action=edit&amp;redlink=1" class="new" title="Script/1.6 (page does not exist)">script</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::switcher/1.6" title="JHtmlBehavior::switcher/1.6">JHtmlBehavior::switcher</a></li>
<li><a href="http://docs.joomla.org/JHtmlBehavior::uploader/1.6" title="JHtmlBehavior::uploader/1.6">JHtmlBehavior::uploader</a></li>
<li><a href="http://docs.joomla.org/JHtmlAccess::usergroup/1.6" title="JHtmlAccess::usergroup/1.6">JHtmlAccess::usergroup</a></li>
<li><a href="http://docs.joomla.org/JHtmlList::users/1.6" title="JHtmlList::users/1.6">JHtmlList::users</a></li>
</ul>
</li>
</ul>
<h3> <span class="mw-headline" id="See_also">See also</span></h3>
<ul>
<li><span>Version 1.6</span> <b>JHtml source code</b> on <a href="http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&amp;path=/development/tags/1.6.x/1.6.3/libraries/joomla/html/html.php&amp;view=markup" class="extiw" title="jframework16:html/html.php">JoomlaCode</a></li>
<li><span>Version 1.6</span> Class <a href="http://docs.joomla.org/JHtml/1.6" title="JHtml/1.6">JHtml</a></li>
<li><span>Version 1.6</span> Subpackage <a href="/Subpackage_Html/1.6" title="Subpackage Html/1.6">Html</a></li>
<li><a href="http://docs.joomla.org/JHtml::" title="JHtml::">Other versions of JHtml::_</a></li>
</ul>
</body>
</html>
